www.gusucode.com > VC++ 酒店管理系统-源码程序 > VC++ 酒店管理系统-源码程序/code/hotel2003/CoolTabBar.cpp
// CoolTabBar.cpp : implementation file // Download by http://www.NewXing.com #include "stdafx.h" #include "resource.h" #include "CoolTabBar.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CCoolTabBar CCoolTabBar::CCoolTabBar() { } CCoolTabBar::~CCoolTabBar() { } BEGIN_MESSAGE_MAP(CCoolTabBar, CCoolControlBar) //{{AFX_MSG_MAP(CCoolTabBar) ON_WM_CREATE() ON_WM_SIZE() ON_WM_ERASEBKGND() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CCoolTabBar message handlers int CCoolTabBar::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CCoolControlBar::OnCreate(lpCreateStruct) == -1) return -1; m_wndTabCtrl.SetBorderStyle(1); m_wndTabCtrl.Create(CRect(10,10,120,340), this); return 0; } void CCoolTabBar::OnSize(UINT nType, int cx, int cy) { CCoolControlBar::OnSize(nType, cx, cy); CRect rc; GetClientRect(&rc); m_wndTabCtrl.MoveWindow(rc); m_wndTabCtrl.AutoSize(); } BOOL CCoolTabBar::OnEraseBkgnd(CDC* pDC) { // CRect rc; // GetClientRect(&rc); //pDC->FillSolidRect(rc, RGB(255, 255, 255)); return TRUE; }